package org.feng.clog.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 操作枚举
 *
 * @author feng
 */
@Getter
@AllArgsConstructor
public enum ActionTypeEnum {

    DEFAULT(""),

    ORDER_CREATE("订单创建");

    private final String desc;

    public static ActionTypeEnum getInstance(String desc) {
        return Arrays.stream(ActionTypeEnum.values()).filter(t -> t.getDesc().equals(desc)).findAny().orElse(null);
    }
}
